import { verifyPc } from "$utils/index"
import { setScrollHeigth } from "$utils/table"

export default {
  data() {
    return {
      scroll: {
        trigger: false,
      },
    }
  },
  methods: {
    async refresherrefresh() {
      this.scroll.trigger = true
      await this.search()
      setTimeout(() => {
        this.scroll.trigger = false
      }, 500)
    },
    setScrollStyle(otherH = 0) {
      // pc 端有导航栏  需要去除导航栏高度
      const otherHeight = (verifyPc() ? 40 : 0) + otherH
      return setScrollHeigth(0, otherHeight)
    },
  }
}
